package com.wswy.wzcx.model;

import android.support.annotation.Keep;
import android.support.annotation.Keep;

import com.google.gson.annotations.SerializedName;
import com.wswy.wzcx.BuildConfig;

/**
 * Created by Administrator on 2017/3/18.
 */
@Keep
public class VersionModel {
    /**
     * "id": 10,
     * "adminId": null,
     * "adminName": null,
     * "channel": "Android",
     * "createTime": "2017-03-14 13:42:57",
     * "description": "werwe",
     * "downloadUrl": "http://dev.zundai.com/upload/da7e1c68-a48f-4eab-ba0c-58cb7de390ba.apk",
     * "isForceUpdate": 0,
     * "md5": null,
     * "remark": "rwqwe",
     * "status": 1,
     * "versionCode": 1,
     * "versionName": "v.1.0.1",
     * "fileSize": 2582259
     */
    private String id;
    private String channel;
    private String createTime;
    private String description;
    private String downloadUrl;
    private String isForceUpdate;
    private String md5;
    private String remark;
    private String status;
    private String versionCode;
    private String versionName;
    private String fileSize;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }



    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public String getIsForceUpdate() {
        return isForceUpdate;
    }

    public void setIsForceUpdate(String isForceUpdate) {
        this.isForceUpdate = isForceUpdate;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public int getVersionCode() {
        try {
            return Integer.parseInt(versionCode);

        } catch (Throwable throwable) {
            return BuildConfig.VERSION_CODE;
        }
    }

    public void setVersionCode(String versionCode) {
        this.versionCode = versionCode;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }

    @Override
    public String toString() {
        return "VersionModel{" +
                "id='" + id + '\'' +
                ", channel='" + channel + '\'' +
                ", createTime='" + createTime + '\'' +
                ", description='" + description + '\'' +
                ", downloadUrl='" + downloadUrl + '\'' +
                ", isForceUpdate='" + isForceUpdate + '\'' +
                ", md5='" + md5 + '\'' +
                ", remark='" + remark + '\'' +
                ", status='" + status + '\'' +
                ", versionCode='" + versionCode + '\'' +
                ", versionName='" + versionName + '\'' +
                ", fileSize='" + fileSize + '\'' +
                '}';
    }
}
